#!/bin/sh

# 下面参数请根据主机环境配置
# ---------------------------------------
# LANG           语言版本
#
# JAVA_HOME      JDK安装目录
#
# APP_Xss         线程栈的大小(一般不需要修改)
#
# APP_Xms         初始堆内存大小
#
# APP_Xmx         最大堆内存的大小
# ---------------------------------------
#LANG=zh
#JAVA_HOME=/export/home/tools/jdk1.6.0_01
#APP_Xss=-Xss1024k
#APP_Xms=-Xms1024m
#APP_Xmx=-Xmx2048m
# ---------------------------------------

#export LANG
#export JAVA_HOME
#PATH=$JAVA_HOME/bin:$PATH
#export PATH

#备份日志文件
#bak_date=`date +%Y%m%d.%H%M%S `
#mv nohup.out nohup.out.$bak_date
#echo "nohup.out日志备份成功,备份后的文件名为:nohup.out.$bak_date"

#CLASSPATH=./classes:./lib/classes129i.jar:./lib/jconn2.jar:./lib/commons-logging-1.0.4.jar:./lib/Linkage-system.jar:./lib/log4j-1.2.14.jar:./lib/proxool-0.9.0RC3.jar:./lib/spring-2.0.6.jar:./lib/jakarta-oro-2.0.8.jar:./lib/commons-net-1.4.1.jar
#export CLASSPATH




proc_id=`ps -aux | grep -i "kylin.jar" | grep -v grep | awk '{print $2}'`


if [ ! -n "$proc_id" ]; then
  echo start kylinOlap 
  java -Xms1024m -Xmx2048m -jar kylin.jar ${1} ${2} &
else
  echo kylinOlap is running
  echo pid is $proc_id
fi




#请参照这个模版,书写其他的脚本配置
#nohup java -Xms256M -Xmx1024M -cp "./*:./classes:./lib/*" -Dtime=20 com.dealeasy.app.service.sysmonitor.Main &
#java -Xms256M -Xmx1024M -cp "./*:./classes:./lib/*" cn.tiansu.eway.olapengine.manager.TimeManager &
